<?
include('../scaffold/people.php');
include('../controller/handler.php');
include('../controller/philomousia.php');

include('../module/var.inc.php');

$hd = new Handler();
$ph = new Philomousia();
$base_url = $hd->getBaseURL();
$hd->openDB();
$people = $ph->loadPeople($hd);
$hd->closeDB();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="it" lang="it">
<head>
	<? include('../module/head.inc.php'); ?>
</head>

<body>
<div id="people"></div>
<div id="content">
<?include('../module/header.inc.php');?>

<?foreach($people as $person) {?>
<div class="person">
	<div class="upper_bar_main"><div class="upper_bar_round"></div></div>
	<div class="body_main_left">
	<div class="body_main_right">
	<div class="body_main">
	<img class="avatar" src="<?echo $person->getImg();?>" alt="avatar" />

	<h2><?echo $person->getName();?> <?echo $person->getSurname();?></h2>
	<p class="small details">
		<?if($person->getLocation()!="") {?><?echo $person->getLocation();?><br /><?}?>
		<?if($person->getMail()!="") {?><a href="mailto:<?echo $person->getMail();?>"><?echo $person->getMail();?></a><br /><?}?>
		<?if($person->getUrl()!="") {?><a href="<?echo $person->getUrl();?>" target="_blank"><?echo $person->getUrl();?></a> 
		<?}?>
	</p>
	<p class="description"><?echo $hd->makeHTML($person->getDescription());?></p>
	
	</div></div></div>
	<div class="lower_bar_main"><div class="lower_bar_round"></div></div>
</div>
<?}?>	

<? include('../module/footer.inc.php'); ?>
</div>
<? include('../module/analytics.inc.php'); ?>
</body>
</html>
